﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace Quản_lý_bán_hàng
{
    public partial class qlbh : DevComponents.DotNetBar.Metro.MetroForm
    {
        public qlbh()
        {
            InitializeComponent();
        }
        public static string ID;
        private void qlbh_Load(object sender, EventArgs e)
        {



            login lg = new login();
            lg.ShowDialog();
            btUser.Text = ID;
            this.Visible = false;
            ribbonControl1.Show();



        }



        private void btExit_Click_1(object sender, EventArgs e)
        {
            DialogResult tb = (MessageBox.Show("Bạn có muốn thoát không?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning));
            if (tb == DialogResult.Yes)
            {
                this.Close();
            }
        }

        private void btSearch_Click(object sender, EventArgs e)
        {
            frmSearchBook sb = new frmSearchBook();
            sb.ShowDialog();
            this.Visible = true;
        }

        private void btDX_Click(object sender, EventArgs e)
        {
            this.Hide();
            login lg = new login();
            lg.ShowDialog();
            this.Visible = true;
        }

      

        private void rbtCash_CheckedChanged(object sender, EventArgs e)
        {
            if (rbtCash.Checked == true)
            {
                txtMoneyPay.Enabled = true;
               
            }
        }

        private void rbtBonus_CheckedChanged(object sender, EventArgs e)
        {
            if (rbtBonus.Checked == true)
            {
                txtMoneyPay.Enabled = false;
                
            }
        }

        private void txtDel_Click(object sender, EventArgs e)
        {
            DialogResult ms =( MessageBox.Show("Bạn có muốn hủy tất cả thông tin trên không ?","",MessageBoxButtons.OKCancel,MessageBoxIcon.Asterisk));
            if(ms==DialogResult.OK)
            {
                txtMoneyPay.Clear();
                txtInformation.ResetText();
            
            }
            
          


        }

        
     

      
    }
}